-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
De-duplicate passwords imports #2920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far @graeme. Thanks for the clear naming on the test credentials, super helpful 🙂. Left minor comment formatting suggestion. I can review new commits when they are ready.
@@ -41,3 +41,12 @@ extension Optional: OptionalProtocol { | |||
} | |||
|
|||
} | |||
|
|||
extension Optional where Wrapped == String { | |||
var isNilOrEmpty: Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
DuckDuckGo/DataImport/Logins/SecureVault/SecureVaultLoginImporter.swift
Outdated
Show resolved
Hide resolved
314cb1b
to
3e00442
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM! Nice one @graeme 🚀
@@ -186,7 +198,11 @@ final class MockSecureVault<T: AutofillDatabaseProvider>: AutofillSecureVault { | |||
return nil | |||
} | |||
|
|||
func inDatabaseTransaction(_ block: @escaping (Database) throws -> Void) throws {} | |||
var spyInDatabaseTransactionBlock: ((Database) throws -> Void)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this naming 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just have some failing Swiftlint rules.
Task/Issue URL: https://app.asana.com/0/1202926619870900/1207598052765981/f
Tech Design URL: https://app.asana.com/0/1202926619870900/1207676132777813/f
Description:
Duplicated passwords are a frequently-reported challenge in adopting our password manager.
Users who import twice or from two different sources may find themselves with hundreds of duplicated entries, making their UI a mess.
This change means that, upon import, passwords that are already stored are not duplicated.
Steps to test this PR:
Definition of Done:
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation
Download latest build from Builds: Deduplicate passwords on import
Reset your autofill data (Debug → Reset Data → Reset Autofill Data)
Import login_deduplication_starting_data.csv from ✓ CSV files with test cases: 0.5 days
Check your logins to ensure that all 17 entries have been imported
Import login_deduplication_test_data.csv from ✓ CSV files with test cases: 0.5 days
Check against ✓ Define a duplicate: 0.5 days rules to make sure duplicates have been removed (the title/notes values should help you identify each case against the examples defined in the rules).
Import login_import_data_large.csv from ✓ CSV files with test cases: 0.5 days to test large import data sets
Import the data from the previous step again to test large import data + large stored data sets
This could be better and I'm timeboxing some low-hanging fruit optimisations to see if can be improved while trying to avoid DB schema changes that may require a migration
The autofill UI is currently not handling large volumes of data very well even before this project. This is being discussed and tracked in Logins/Autofill: improve list view performance